package io.renren.modules.task.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;
import io.renren.modules.task.dao.MtCcEquipmentDao;
import io.renren.modules.task.entity.MtCcEquipmentEntity;
import io.renren.modules.task.service.MtCcEquipmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;


@Service("mtCcEquipmentService")
public class MtCcEquipmentServiceImpl extends ServiceImpl<MtCcEquipmentDao, MtCcEquipmentEntity> implements MtCcEquipmentService {

    @Autowired
    private MtCcEquipmentDao mtCcEquipmentDao;
    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<MtCcEquipmentEntity> page = this.page(
                new Query<MtCcEquipmentEntity>().getPage(params),
                new QueryWrapper<MtCcEquipmentEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public List<MtCcEquipmentEntity> getAllConsole() {
        return mtCcEquipmentDao.getAllConsole();
    }

}